#ifndef SIMPLE_PROPERTY_EDITOR_H
#define SIMPLE_PROPERTY_EDITOR_H

#include <wx/panel.h>
#include <wx/splitter.h>
#include <wx/treectrl.h>
#include <wx/propgrid/propgrid.h>
#include <wx/stc/stc.h>
#include <map>  // 添加 missing include

class SimplePropertyEditor : public wxPanel
{
public:
    SimplePropertyEditor(wxWindow* parent);
    
private:
    void CreateControls();
    void SetupPropertyLexer();
    void ParsePropertiesToTree();
    void UpdatePropertyGrid();
    void GeneratePropertiesFromTree();
    
    // 事件处理
    void OnTreeSelectionChanged(wxTreeEvent& event);
    void OnPropertyChanged(wxPropertyGridEvent& event);
    void OnEditorModified(wxStyledTextEvent& event);
    
    // 三组件
    wxSplitterWindow* m_mainSplitter;
    wxSplitterWindow* m_rightSplitter;
    wxTreeCtrl* m_treeCtrl;
    wxStyledTextCtrl* m_editor;
    wxPropertyGrid* m_propertyGrid;
    
    // 简单数据模型
    std::map<wxTreeItemId, wxString> m_treeItemData;
    
    wxDECLARE_EVENT_TABLE();
};

#endif // SIMPLE_PROPERTY_EDITOR_H
